#ifndef COUNTRY_H
#define COUNTRY_H

#include<QString>
#include<QDate>
#include<QList>
#include <QTextStream>
#include <QTextCodec>
#include"athlete.h"

class Country
{
public:
    Country();
    ~Country();
    friend std::ostream& operator<<(std::ostream& os, const Country& country);


    void getValue(int& numCode, QString& alphaCode, QString& chiName, QString& engName, int& teamSize, int& gold, int& silver, int& bronze);
    void setValue(int& numCode, QString& alphaCode, QString& chiName, QString& engName, int& teamSize, int& gold, int& silver, int& bronze);

    void read(QTextStream& aStream);
    void save(QTextStream& aStream);


    QString getName()
    {
        return chiName;
    }

    int getNumCode()
    {
        return numCode;
    }

    void getMedals(int& gold, int& silver, int& bronze);

    QVector<Athlete> vecAthlete;
private:
    int numCode;
    QString alphaCode;
    QString chiName;
    QString engName;
    int teamSize;
    int gold;
    int silver;
    int bronze;
};
#endif // COUNTRY_H
